<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>提交硬广合同</title>
    <style>
        body {
            font-family: 'Segoe UI', sans-serif;
            max-width: 800px;
            margin: 40px auto;
            padding: 30px;
            background: #f8f9fa;
        }

        .form-container {
            background: white;
            padding: 40px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        h2 {
            color: #2d3436;
            margin-bottom: 30px;
            border-bottom: 2px solid #6c5ce7;
            padding-bottom: 10px;
        }

        .alert-success {
            background: #d4edda;
            color: #155724;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 25px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #495057;
            font-weight: 500;
        }

        input[type="date"],
        select,
        textarea,
        input[type="text"] {
            width: 100%;
            padding: 10px;
            border: 2px solid #e9ecef;
            border-radius: 6px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        input:focus,
        select:focus,
        textarea:focus {
            border-color: #6c5ce7;
            outline: none;
        }

        button {
            background: #6c5ce7;
            color: white;
            padding: 12px 30px;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s;
        }

        button:hover {
            background: #5b4bc4;
            transform: translateY(-1px);
        }
    </style>
</head>
<body>
    <div class="form-container">
        <h2>📄 提交硬广合同</h2>

        {% if message %}
            <div class="alert-success">{{ message }}</div>
        {% endif %}

        <form method="POST">
            {% csrf_token %}
            
            <div class="form-group">
                <label>开始时间</label>
                <input type="date" name="start_time" required>
            </div>

            <div class="form-group">
                <label>结束时间</label>
                <input type="date" name="end_time" required>
            </div>

            <div class="form-group">
                <label>发布位置</label>
                <select name="site">
                    <option value="首页">首页</option>
                    <option value="顶部">顶部</option>
                    <option value="底部">底部</option>
                </select>
            </div>

            <div class="form-group">
                <label>广告内容</label>
                <textarea name="content" rows="4"></textarea>
            </div>

            <div class="form-group">
                <label>图片路径（可选）</label>
                <input type="text" name="image_path">
            </div>

            <div class="form-group">
                <label>视频路径（可选）</label>
                <input type="text" name="video_path">
            </div>

            <div class="form-group" style="margin-top: 30px;">
                <button type="submit">📩 提交合同</button>
            </div>
        </form>
    </div>
</body>
</html>